package com.ruoyi.product.controller;

import java.util.List;

import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.servlet.http.HttpServletResponse;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.product.domain.ProductActivityCategory;
import com.ruoyi.product.service.IProductActivityCategoryService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;

/**
 * 活动自定义分类Controller
 * 
 * @author liuhuizhong
 * @date 2025-08-13
 */
@RestController
@RequestMapping("/web/productActivityCategory")
@Tag(name = "活动自定义分类接口", description = "提供活动自定义分类操作")
public class ProductActivityCategoryController extends BaseController
{
    @Autowired
    private IProductActivityCategoryService productActivityCategoryService;


    /**
     * 按活动编号查询活动自定义分类列表
     */
    @GetMapping("/listByActivityId")
    @Operation(summary = "按活动编号查询活动自定义分类列表", description = "")
    public TableDataInfo listByActivityId(Long activityId)
    {
        List<ProductActivityCategory> list = productActivityCategoryService.getActivityCategoryListByActivityId(activityId);
        return getDataTable(list);
    }

    @GetMapping("/listByActivityId2")
    @Operation(summary = "按活动编号查询活动自定义分类列表2", description = "")
    public TableDataInfo listByActivityId2(Long activityId)
    {
        List<ProductActivityCategory> list = productActivityCategoryService.getActivityCategoryListByActivityId(activityId);
        return getDataTable(list);
    }


}
